Intelligent 3D LED Smart Alarm Clock

Fantanstic Project created by
Ding Yang, Steve Wang and Keyun Gao


Demonstration Video


Introduction

Intelligent 3D LED Smart Alarm Clock is an compact designed electronic object that integrates functions like displaying current time, set alarm and make an alarm sound when the set time is reached, switch to different special displaying effects when accelerometer detects pose change, etc.

It comprises three LED panels, each has 16x32 pixels, all three panels are installed in the 3D printed base with magnets so they are all dismountable. Three panels form a triangular space, where Raspberry Pi 4B, LED matrix driver hat, accelerometer and button related circuitry are installed inside of it.

The RGB matrix driver hat produced by Adafruit is used to drive the LED panels. We employed the open source library rpi-rgb-led-matrix and created many interfaces on top of it to better control all the displaying details in pixel accuracy.


Generic placeholder image

Project Objective:

  • In default mode, it displays current time.
  • In default mode, when the clock is held horizontally, the time will automatically show on the side that aims directly at users; when the clock is held vertically, the digits of time will fall down to the ground side like sand; when the clock is held horizontally again, the “sand of time” will backtrack to their starting position to form the original time.
  • In alarm setting mode, it allows users to set the alarm time by two buttons, one for selecting hour or minute, and the other for incrementing the set time.
  • In zen mode, all three panels display the selected picture in a scrolling way (by default Tai Chi diagram)
  • In snowflake mode, we simulate 100 pixels in one panel like snowflakes, they will fall and bounce between the sides with the change of pose, which is achieved by reading data from the accelerometer inside the clock.

Design

3D Printed Case

All the 3D printed objects are designed in Onshape, an online CAD software system that helps create different 3D models and assemblies.
The 3D printed case for our project is composed of 2 bases and 3 side bars.

Base

The base part are printed twice.

Base

Side Bars

The overall structure of three side panels are the same, but they differ in a few details.
One has 16 holes designed to install 4 buttons.
One has a long notch on one side to let power cable and speaker cable go through.
The shape of them is designed to better fit between the bases and the panels without the help of screws or glue.

Side Bars

Assembly

assembly

Magnets and screws

We purchased magnets from Amazon and installed them on three LED panels with screws, on the bases with glue.
The LED panels and the bases are connected fully in magnetic attraction force.

assembly

Hardware

The hardware design is shown below, we have four buttons and one accelerometor in the circuit.
They need seven GPIO pins to connect to the RPi.
The buttons are pulled down in our code.

assembly

Software

This is an outline for our software design.
It contains cpp programs, python programs and shell scripts.
It also utilized FIFO to communicate between different processes.

assembly

Testing

Default Mode

1. Horizontal

2. Scroll in Horizontal State

3. Horizontal to Vertical

4. Vertical to Horizontal

Alarm Setting Mode

1. Set Hour

2. Set Minute

Zen Mode

Snowflake Mode


Result

We connected all the above hardware components successfully in one compact triangular box, it is fully demountable, making debugging more easy.
All the functions that we provide pass multiple tests, proving the robustness of our designed system.


Work Distribution

Generic placeholder image

Project group picture

Ding Yang

dy297@cornell.edu

I am responsible for all the 3D printed case design, vertical to horizontal and horizontal to vertical displaying effect design, pose estimate based on accelerometer. I also helped to align the accelerometer with the LED panel to better display the snowflake effect.

Steve Wang

sw2327@cornell.edu

TIn summary, my role in this project encompasses both the development of the software and the facilitation of team collaboration. I took charge of coding and fine-tuning the program while also initiating and actively contributing to group meetings and brainstorming sessions.

Keyun Gao

kg535@cornell.edu

In this project, I am tasked with developing engaging interactive effects across multiple panels for the LED display. I've introduced a 'snow' game, employing IMU data and mathematical transformations to enable individual pixels to simulate the natural movement of snow. Additionally, my responsibilities encompassed system assembly and the implementation of peripherals.


Parts List

Total: $76.10


References

Raspberry Pi RGB LED Matrix Library
Snowflake Effect Project
R-Pi GPIO Document

Code Appendix

The code for our project is too large to display here.
Please check it in the GitHub Repository: ece5725-final-project